/*
 * @Author: wkwu2
 * @Date: 2020-03-25 16:26:11
 * @LastEditors: wkwu2
 * @LastEditTime: 2020-03-26 14:52:31
 * @Description: 
 */
import styled from 'styled-components'
import logPic from '../../static/img/log.png'

export const HeaderWrapper = styled.div`
    height: 58px;
    max-width: 1440px;
    min-width: 768px;
    margin: 0 auto;
    position: relative;
    .left{
        float: left;
    }
    .right{
        float: right;
    }
    .btn{
        display: inline-block;
        vertical-align: middle;
        font-weight: 400;
        text-align: center;
        padding: 6px 12px;
        cursor: pointer;
    }
`

export const Logo = styled.a.attrs({
    href: "/"
})`
    position: absolute;
    background: url(${logPic});
    background-size: contain;
    display: block;
    width: 100px;
    height: 58px;
    float: left;
`

export const Nav = styled.div`
    width: 960px;
    margin: 0 auto;
    padding: 0 15px;
    height: 58px;
`

export const NavItem = styled.div`
    line-height: 58px;
    padding: 0 15px;
    .iconfont{
        color: #969696;
        font-weight: 500;
        font-size: 20px;
    }
    .iconfontNav{
        margin-right: 5px;
        vertical-align: bottom;
    }
`

export const NavSearch = styled.input.attrs({
    placeholder: '搜索',
    autocomplete:"off"
})`
    height: 38px;
    width: 240px;
    line-height: 58px;
    margin-top: 9px;
    border-radius: 40px;
    background: #eee;
    font-size: 14px;
    padding: 0 40px 0 20px;
    outline: none;
    border: none;
    float: left;
    &.focused{
        width: 320px;
    }
    &.slide-enter{
        width: 240px;
    }
    &.slide-enter-active{
        width: 320px;
        transition: all .3s ease-out;
    }
    &.slide-exit{
        width: 320px;
    }
    &.slide-exit-active{
        width: 240px;
        transition: all .3s ease-out;
    }
`

export const WriteArticle = styled.a.attrs({
    href: "/"
})`
    width: 100px;
    height: 40px;
    line-height: 24px;
    border-radius: 20px;
    background-color: #ea6f5a;
    color: #fff;
    font-size: 15px;
    margin: 8px 12px 0;
    box-sizing: border-box;
`

export const SignUp = styled.a`
    width: 100px;
    height: 38px;
    line-height: 24px;
    border-radius: 20px;
    border: 1px solid rgba(236,97,73,.7);
    color: #ea6f5a;
    margin: 9px 5px 0 15px;
`

export const SignIn = styled.a`
    width: 80px;
    line-height: 1.42857;
    margin: 11px 6px 0 10px;
    color: #969696;
`
export const AppDownload = styled.div`
    height: 55px;
    padding: 15px 0;
    margin: 0 12px;
`

export const AppDownloadA = styled.a`
    height: 100%;
    width: 100%;
`

export const AppDownloadImg = styled.img`
    height: 25px;
    vertical-align: middle;
`

export const NavSearchWrap = styled.div`
    position: relative;
    float: left;
    &.focused{
        width: 320px;
    }
    .zoom{
        position: absolute;
        right: 5px;
        bottom: 5px;
        width: 30px;
        height: 30px;
        line-height: 30px;
        text-align: center;
        border-radius: 15px;
        &.focused{
            background: #777;
            color: #fff;
        }
    }
`

export const SearchInfo = styled.div`
    width: 250px;
    background-color: #fff;
    box-shadow: 0 0 8px rgba(0,0,0,.2);
    position: absolute;
    top: 100%;
    left: 0;
    border-radius: 3px;
    margin-top: 9px;
    padding: 20px 20px 0 20px;
    line-height: 1;
    &::before{
        content: "";
        width: 0;
        height: 0;
        border: 12px solid transparent;
        border-bottom-color: #fff;
        bottom: 99%;
        position: absolute;
        left: 32px;
    }
`
export const SearchTitle = styled.div`
    overflow: hidden;
    .switchIcon{
        font-size: 13px;
        font-weight: normal;
        margin-right: 2px;
        transition: all .3s ease-in;
        transform-origin: center center;
    }
`

export const SearchTip = styled.span`
    color: #969696;
    font-size: 14px;
`
export const SearchSwitch = styled.span`
    color: #969696;
    font-size: 13px;
    float: right;
    cursor: pointer;
`

export const SearchItemWrap = styled.div`
    overflow: hidden;
    margin-top: 10px;
`

export const SearchItem = styled.div`
    border: 1px solid #ddd;
    font-size: 12px;
    float: left;
    color: #969696;
    line-height: 20px;
    padding: 0px 5px;
    margin-right: 6px;
    margin-bottom: 8px;
`
